﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace VoliaStat
{
    class ContentArea
    {
        public string text;
        public Font font;
        public Brush brush;
        public Rectangle rectangle;
        public StringAlignment align;
        public bool enabled=false;

        StringFormat _sf;

        public void Update()
        {
			_sf = new StringFormat();
			_sf.Alignment = align;
			_sf.LineAlignment = StringAlignment.Center;
			_sf.FormatFlags = StringFormatFlags.MeasureTrailingSpaces;
			_sf.Trimming = StringTrimming.Word;
        }

        public void Paint(Graphics grfx)
        {
            if (enabled) grfx.DrawString(text, font, brush, rectangle, _sf);

            //grfx.DrawRectangle(Pens.Black,rectangle);

        }





    }
}
